// 票据对应退货单据
const {DataTypes, db } = require("../db");
db.define('invoiceBack', {
id: {type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true,comment:'表自增ID'},
tenantId:{type: DataTypes.INTEGER,allowNull:false,defaultValue:0,comment:'租户ID'}, 
oldIid:{type: DataTypes.INTEGER,allowNull:false,defaultValue:0,comment:'原票据'}, 
iid:{type: DataTypes.INTEGER,allowNull:false,defaultValue:0,comment:'关联的退货票据ID'}, 
cby:{type: DataTypes.INTEGER,defaultValue:0,comment:'创建人'}, 
ctime:{type: DataTypes.STRING(20),defaultValue:(''),comment:'创建时间'}, 
uby:{type: DataTypes.INTEGER,defaultValue:0,comment:'更新人'}, 
utime:{type: DataTypes.STRING(20),defaultValue:(''),comment:'更新时间'}, 
dby:{type: DataTypes.INTEGER,defaultValue:0,comment:'删除人'}, 
dtime:{type: DataTypes.STRING(20),defaultValue:(''),comment:'删除时间'}, 
isDel:{type: DataTypes.INTEGER,defaultValue:0,comment:'删除0/1'}, 

}, {
    tableName: 'invoice_back',
    timestamps: false,
    comment: '票据对应退货单据'
});